import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
  base: "/doc/",// 前后需加斜杠
  title: "网校说明",
  description: "介绍药店教育网网校系统的使用方法",
  srcDir: "src",
  themeConfig: {
    logo: "/logo.png", // 本地图片（放在 public 目录下）
    // 或远程图片：
    // logo: 'https://example.com/logo.png',

    outline: {
      label: "本文目录", // 将默认的 "On this page" 改为中文
    },
    docFooter: {
      prev: "上一篇", // 将 "prev page" 改为中文
      next: "下一篇", // 将 "next page" 改为中文
    },
    search: {
      provider: "local", // 默认值，可省略
      options: {
        // 自定义搜索界面的中文翻译
        translations: {
          button: {
            buttonText: "搜索文档", // 搜索按钮文字
            buttonAriaLabel: "搜索文档", // 无障碍访问标签
          },
          modal: {
            noResultsText: "无匹配结果", // 无结果时的提示
            resetButtonTitle: "清除查询条件", // 重置按钮标题
            footer: {
              selectText: "选择",
              navigateText: "切换",
              closeText: "关闭",
            },
          },
        },
      },
    },

    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: "首页", link: "/" },
      // { text: '个人学习说明', link: '/markdown-examples' }
      {
        text: "网校功能说明",
        link: "/其他/网校功能说明",
        activeMatch: "/其他/",
      },
      {
        text: "个人学习说明",
        link: "/个人/电脑学习方式",
        activeMatch: "/个人/",
      },
      { text: "企业后台说明", link: "/企业/登录账号", activeMatch: "/企业/" },
    ],
    sidebar: [
      { text: "网校功能说明", link: "/其他/网校功能说明" },
      {
        text: "个人说明",
        items: [
          // { text: 'Markdown Examples', link: '/markdown-examples' },
          { text: "电脑学习方式", link: "/个人/电脑学习方式" },
          { text: "手机学习方式介绍", link: "/个人/手机学习方式" },
          { text: "创建桌面图标的方式", link: "/个人/创建桌面图标的方式" },
        ],
      },
      {
        text: "企业说明",
        items: [
          { text: "登录账号", link: "/企业/登录账号" },
          { text: "Runtime API Examples", link: "/api-examples" },
        ],
      },
    ],

    socialLinks: [
      // { icon: 'github', link: 'https://github.com/vuejs/vitepress' }
      {
        icon: {
          svg: '<svg t="1757749301858" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5376" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M683.058 364.695c11 0 22 1.016 32.943 1.976C686.564 230.064 538.896 128 370.681 128c-188.104 0.66-342.237 127.793-342.237 289.226 0 93.068 51.379 169.827 136.725 229.256L130.72 748.43l119.796-59.368c42.918 8.395 77.37 16.79 119.742 16.79 11 0 21.46-0.48 31.914-1.442a259.168 259.168 0 0 1-10.455-71.358c0.485-148.002 128.744-268.297 291.403-268.297l-0.06-0.06z m-184.113-91.992c25.99 0 42.913 16.79 42.913 42.575 0 25.188-16.923 42.579-42.913 42.579-25.45 0-51.38-16.85-51.38-42.58 0-25.784 25.93-42.574 51.38-42.574z m-239.544 85.154c-25.384 0-51.374-16.85-51.374-42.58 0-25.784 25.99-42.574 51.374-42.574 25.45 0 42.918 16.79 42.918 42.575 0 25.188-16.924 42.579-42.918 42.579z m736.155 271.655c0-135.647-136.725-246.527-290.983-246.527-162.655 0-290.918 110.88-290.918 246.527 0 136.128 128.263 246.587 290.918 246.587 33.972 0 68.423-8.395 102.818-16.85l93.809 50.973-25.93-84.677c68.907-51.93 120.286-119.815 120.286-196.033z m-385.275-42.58c-16.923 0-34.452-16.79-34.452-34.179 0-16.79 17.529-34.18 34.452-34.18 25.99 0 42.918 16.85 42.918 34.18 0 17.39-16.928 34.18-42.918 34.18z m188.165 0c-16.984 0-33.972-16.79-33.972-34.179 0-16.79 16.927-34.18 33.972-34.18 25.93 0 42.913 16.85 42.913 34.18 0 17.39-16.983 34.18-42.913 34.18z" fill="#09BB07" p-id="5377"></path></svg>',
        },
        link: "/其他/微信联系",
      },

      {
        icon: {
          svg: '<svg t="1757749146267" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5230" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M818 206.6C736.4 125 628 80 512.6 80c-115.4 0-223.8 45-305.4 126.6-81.6 81.6-126.6 190-126.6 305.4 0 115.4 45 223.8 126.6 305.4 81.6 81.6 190 126.6 305.4 126.6 115.4 0 223.8-45 305.4-126.6s126.6-190 126.6-305.4c0-115.2-45-223.8-126.6-305.4zM512.6 872.2c-198.6 0-360-161.4-360-360s161.4-360 360-360 360 161.4 360 360c0 198.4-161.6 360-360 360z" fill="#31B7C2" p-id="5231"></path><path d="M737 427.2h-147.6v-147.6c0-34-27.6-61.6-61.6-61.6h-47c-34 0-61.6 27.6-61.6 61.6v147.6H272c-34 0-61.6 27.6-61.6 61.6v47c0 34 27.6 61.6 61.6 61.6h115.2l74.2-74.2-34.8-34.8 162.4-60.6-58.4 164.6-36.8-36.8-74.2 74.2v115.2c0 34 27.6 61.6 61.6 61.6H528c34 0 61.6-27.6 61.6-61.6v-147.6h147.6c34 0 61.6-27.6 61.6-61.6v-47c-0.2-34.2-27.8-61.6-61.8-61.6z" fill="#31B7C2" p-id="5232"></path></svg>', // 直接嵌入 SVG 代码
        },
        link: "https://www.ydjy365.cn",
      },
    ],
  },
});
